# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=gnome-session
pkgver=42.0
pkgrel=2
pkgdesc="GNOME session manager"
url="https://gitlab.gnome.org/GNOME/gnome-session"
# s390x and riscv64 blocked by polkit -> upower
arch="all !s390x !riscv64"
license="GPL-2.0-or-later"
depends="
	alsa-plugins-pulse
	bash
	dconf
	polkit
	pulseaudio-alsa
	"
makedepends="
	docbook-xml
	elogind-dev
	gnome-desktop-dev
	gnome-settings-daemon-dev
	gtk+3.0-dev
	itstool
	json-glib-dev
	libsm-dev
	libxml2-utils
	libxslt
	meson
	startup-notification-dev
	upower-dev
	xmlto
	"
options="!check" #no tests
subpackages="$pkgname-lang $pkgname-doc"
source="https://download.gnome.org/sources/gnome-session/${pkgver%%.*}/gnome-session-$pkgver.tar.xz
	dont-require-systemd.patch
	"

build() {
	abuild-meson \
		-Dsystemd_journal=true \
		-Dsystemd_session=disable \
		. output
	meson compile ${JOBS:+-j ${JOBS}} -C output
}

check() {
	meson test --no-rebuild -v -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
	rm -rf "$pkgdir"/DELETEME
}
sha512sums="
3d340700958b5800039e3009618709add2cdbaecb58344d9d2f93e4e761a737ef003091c380c68f95386dbb078b3d12f70732f0022611ab4a10e1c1eb988b4fa  gnome-session-42.0.tar.xz
fc8d42503bffb7e35ea83cef41e6dc4b1c1e9fccbcd660e4cecf923486e24c3725566e644ba14a6e1dd02dd0620e959aa9b117ce52d9c708d2c83700daf68f83  dont-require-systemd.patch
"
